<?php if(!defined("PATH_HD"))exit;C("SHOW_NOTICE",false);?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link type="text/css" rel="stylesheet" href="http://localhost/hb/easycms/admin/tpl/public/css/category.css"/>
        <script type='text/javascript'>
		HOST = 'http://localhost';
		ROOT = 'http://localhost/hb/easycms';
		HDPHP = 'http://localhost/hdphp';
		STATIC = 'http://localhost/hb/easycms/static';
		HDPHPDATA = 'http://localhost/hdphp/data';
		HDPHPTPL = 'http://localhost/hdphp/libs/tpl';
		HDPHPPLUGIN = 'http://localhost/hdphp/plugin';
		WEB = 'http://localhost/hb/easycms/admin.php';
		APP = 'http://localhost/hb/easycms/admin.php';
		CONTROL = 'http://localhost/hb/easycms/admin.php/category';
		METH = 'http://localhost/hb/easycms/admin.php/category/index';
		URL = 'http://localhost/hb/easycms/admin.php/category/index';
		TPL = 'http://localhost/hb/easycms/admin/tpl';
		PUBLIC = 'http://localhost/hb/easycms/admin/tpl/public';
</script>
        <script type='text/javascript' src='http://localhost/hdphp/plugin/jquery-1.8.2.min.js'></script>
        <script type="text/javascript" src="http://localhost/hb/easycms/admin/tpl/public/js/category.js"></script>
    </head>
    <body>
        <h2 class='add_top'>
            <a href="<?php echo U('addshow');?>">添加顶级栏目</a>
        </h2>
        <div class='add_list'>
        <table class="table1">
            <thead>
                <tr>
                    <th width="10%">CID</th>
                    <th width="10%">PID</th>
                    <th width='38%'>栏目名称</th>
                    <th width='10%'>文章数量</th>
                    <th  width="30%">操作</th>
                </tr>
            </thead>
            <tbody>
                <?php $hd["list"]["n"]["total"]=0;
if(!empty($data)):
$hd_list_total = count($data);
$hd_list_row = min($hd_list_total,1000);
$hd_list_row = floor($hd_list_row/1);
$hd_list_id=0;
$hd_list_start=1;
$hd_list_step=0;foreach($data as $hd_list_key =>$hd_list_value):
if($hd_list_start<1){$hd_list_start++;continue;}
if($hd_list_step %1!=0){$hd_list_step++;continue;}
$hd_list_step++;$hd["list"]["n"]["first"]=$hd_list_id==0?true:false;
$hd["list"]["n"]["last"]=$hd_list_id>=$hd_list_row-1?true:false;
$hd["list"]["n"]["index"]=$hd_list_id+1;
$n=$hd_list_value;?>

                    <tr>
                        <td><?php echo $n['cid'];?></td>
                        <td><?php echo $n['pid'];?></td>
                        <td><?php echo $n['catname'];?></td>
                        <td>0</td>
                        <td>
                            <a href="http://localhost/hb/easycms/admin.php/category/addshow1/cid/<?php echo $n['cid'];?>">添加子栏目</a> |
                            <a href="http://localhost/hb/easycms/admin.php/category/editshow/cid/<?php echo $n['cid'];?>">编辑栏目</a> |
                            <a href="<?php echo U('arc/addshow',array('cid'=>$n['cid']));?>">添加文章</a> |
                            <a href="javascript:;" cid='<?php echo $n['cid'];?>' class='delcategory'>删除栏目</a>
                        </td>
                    </tr>
                <?php if($hd_list_id+1>=$hd_list_row){break;}
$hd_list_id++;
endforeach;
$hd["list"]["n"]["total"]=$hd_list_id+1;
endif;
?>
            </tbody>
        </table>
    </div>
    <div class='page'><?php echo $page;?></div>
    </body>
</html>
